<link media="screen" rel="stylesheet" type="text/css"
	href="<?php echo ROOT_URL?>/public/admin.css" />
<center>
<div class="addcate">
	<form action="" method="post">		
			<h1>Assign Keyword to category</h1>
			 <?php 
			  if($this->errors){
				foreach($this->errors as $item)
				{echo '<span style="color:red;font-weight:bold;">'.$item.'</span><br>';}
			}
			  ?><br>
			<label>Category :</label>
			  <select name="cate">
					<option value="0">Chọn Category</option>
					<?php foreach ($this->datacate as $info) {
						?>
						<option value="<?php echo $info['id'];?>"><?php echo $info['name'];?></option>	
					<?php }?>									
				</select>
			<br>
			
			<div class="group">
			  <fieldset >
			    <legend>Keyword :</legend>
			    <table>
			    	<tr>
			    		<td>Choose Exist Keyword :</td>
			    		<td>
			    			<select name="keyword">
								<option value="0">Chọn keyword</option>
								<?php foreach ($this->datakey as $item) {
									?>
									<option value="<?php echo $item['id'];?>"><?php echo $item['name'];?></option>	
								<?php }?>
												
							</select>
			    		</td>
			    	</tr>
			    	<tr>
			    		<td>Or Create New Keyword :</td>
			    		<td>
			    			<input type="text" name="txtkeyword" size="25"/>
			    		</td>
			    	</tr>	
			    </table>
			  </fieldset>
			</div>
				
			<br>
			
			
			<label>&nbsp;</label><input type="submit" name="ok" value="Assign" />		
	</form>	
</div>


  
<div class="list_keyword_website">
	<table class="table-3">
		<tr>
			<th>Cate Name</th>
			<th>Keyword Name</th>
		</tr>
		<?php foreach ($this->list_cate_keyword as $item) {?>
			<tr>
				<td><?php echo $item->category_name;?></td>
				<td><?php echo $item->keyword_name;?></td>
			</tr>
		<?php }?>
	</table>
	
</div>

</center>